package org.tabularium.text.html;

/**
 * Calls {@link HtmlEscapeSequence#removeEscapedCh(String)} to unescape
 * text.
 */
public class HtmlSequenceUnescaper implements HtmlContentAnalyzer {

	private static HtmlSequenceUnescaper instance = null;
	
	protected HtmlSequenceUnescaper() {
		
	}
	
	public String analyze(HypertextUnit u, String text) {
		if (text != null)
			text = HtmlEscapeSequence.removeEscapedCh(text);
		return text;
	}
	
	public static HtmlSequenceUnescaper getInstance() {
		if (instance == null) {
			instance = new HtmlSequenceUnescaper();
		}
		return instance;
	}
}
